<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>找回密码</title>
<link rel='stylesheet' type='text/css' href='css/style.css' />
<script type="text/javascript" src="../js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="../js/formcheck.js"></script>
<script type="text/javascript">
	var hrefUrl = location.href;
	var indexNum = hrefUrl.indexOf("/", hrefUrl.indexOf("/", 10)+1);
	var servletUrl = hrefUrl.substring(0, indexNum) + "/change/service";
	//alert(servletUrl);

	var getAjax = false; //提交

    function changeStyle(id,text,classSty)
    {
    	$("#"+id+"Sty").removeClass().addClass(classSty);
    	$("#"+id+"Text").html(text);
    }
	    	
	$(function()
	{
		//提交
	    $("#check_username_button").click(function()
	    {
	    	changeStyle("username", "", "");
	    	changeStyle("mark", "", "");
			var username = $.trim($("#username").val());
	    	if(username == "" || username == "证件号/用户名/手机号/邮箱")
			{
				//alert("请输入登录名");
				changeStyle("username", "请输入登录名", "wrongSty");
				return false;			
			}
			var mark = $.trim($("#mark").val());
	    	if(mark == "")
			{
				//alert("请输入验证码");
				changeStyle("mark", "请输入验证码", "wrongSty");
				return false;			
			}
	    	if(getAjax) return;
	    	getAjax = true;
	    	
	    	$.ajax(
			{'url':servletUrl,'type':'post','data':'function_code=checkMark&check_type_key=checkMember_username&username='+username+'&mark='+mark,'dataType':'json','cache':false
				,'success':function(data,statusText)
				{
	    	   		if(data.result == "0000")
	    	   		{
	    	   			//alert(data.info.member_mobile+"|"+data.info.member_email);
	    	   			//location.href = "./findpwd2.jsp?mobile="+data.info.member_mobile+"&email="+data.info.member_email;
	    	   			setCookieCommon("findpwd_mobile", data.info.member_mobile);
	    	   			setCookieCommon("findpwd_email", data.info.member_email);
	    	   			location.href = "./findpwd2.jsp";
	    	   		}
	    	   		else
	    	   		{
	    	   			getAjax = false;
	    	   			if(data.result == "1111")
	    	   			{
	    	   				changeStyle("username", data.errordesc, "wrongSty");
	    	   				$("#mark").val("");
	    	   				getRandomGif();
	    	   			}
	    	   			else
	    	   			{
	    	   				changeStyle("mark", data.errordesc, "wrongSty");
	    	   			}
	    	   		}
	    	    }
	    	});	    	
	    });	
	    	    
	});	
	
	function getRandomGif()
	{	
  		var times = Math.random()+0.01;
  		var url = hrefUrl.substring(0, indexNum)+"/logon/image?now="+times;
		document.getElementById("image").src = url;
	}
		
	function initUserInfo()
	{
		var errorIndex = hrefUrl.indexOf("?error");
		var error = hrefUrl.substring(errorIndex+7);
		//alert(error);	
		if(errorIndex > 0)
		{
			if(error == "0003")
			{
				changeStyle("username", "无效链接", "wrongSty");
			}
			else if(error == "0008")
			{
				changeStyle("username", "链接已经失效", "wrongSty");
			}
		}		
	}
		    
</script>	
</head>

<body onload="initUserInfo();getRandomGif();">
 <div id="contain">
 
<!--导航部分-->
   <div id="navReg">
      <div  id="navRegFP2">
	  
       <div class="stepFP_hover">
	      <span class="bgXuhao_hover fl">1</span>填写登录名
	   </div>
	   
	   <div class="stepFP">
	      <span class="bgXuhao fl">2</span>验证身份
	   </div>
	   
	   <div class="stepFP">
	      <span class="bgXuhao fl">3</span>设置新密码
	   </div>   
	   
	   <div class="stepFP">
	      <span class="bgXuhao fl">4</span>成功
	   </div>
	   
	   </div>

   </div>
   
   
   
   
   
   
<!--内容部分-->   
   <div id="contentReg">
   
   
      <div class="telSty2 umar-t">
        <div class="titleRegFP">登录名</div>

        <div class="inputdiv">
            <input name="username" id="username" type="text" class="inputSty1" value="证件号/用户名/手机号/邮箱" onfocus="if (value =='证件号/用户名/手机号/邮箱'){value =''}" onblur="if (value ==''){value='证件号/用户名/手机号/邮箱'}" />
        </div>
		
		<div class="blankSty"><div id="usernameSty" ></div><div id="usernameText"></div></div>
		
      </div>
	  
      <div class="noneReg"></div>
	  
	  
	  <div class="telSty2 clear umar-t">
				<div class="titleRegFP">验证码</div>
		
				<div class="inputdiv" style="margin-right:10px;">
					<input name="mark" id="mark" value=""  type="text" class="inputSty4" maxlength="6" />
				</div>
				
				<div class="btnAcc"><img id="image" src="" alt="看不清，换一张" style="width:90px; height:37px; cursor:hand" onclick="getRandomGif()" /></div>
						
				<div class="blankSty"><div id="markSty" ></div><div id="markText"></div>
		
       </div>


      <div class="noneReg"></div>
	  
	  
	  <div class="btnReg umar-t" id="check_username_button"><a href="javascript:void(0)">提 交</a></div>

  </div>
  
  
  
  
  
  

  
  
  



</div>
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "//hm.baidu.com/hm.js?b7f4a12c6b299f2870e826ec7b955f9a";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>
<script type="text/javascript">
function getCookieNew(c_name)
{
	if(document.cookie.length>0)
 	{
 		var c_start=document.cookie.indexOf(c_name + "=");
 		if(c_start!=-1)
   		{ 
   			c_start=c_start + c_name.length+1; 
   			var c_end=document.cookie.indexOf(";",c_start);
   			if(c_end==-1) c_end=document.cookie.length;
   			return unescape(document.cookie.substring(c_start,c_end));
   		} 
 	}
	return "";
}
var UID = getCookieNew('tkmid');
var UserType = getCookieNew('member_policy');
//alert('tkmid='+UID+' UserType='+UserType);
var _smq = _smq || [];
_smq.push(['_setAccount', '59e39c0', new Date()]);
_smq.push(['_setDomainName', 'taikang.com']);
_smq.push(['_setCustomVar', 1, UID, 1]);
_smq.push(['_setCustomVar', 2, UserType, 1]);
_smq.push(['pageview']);

(function() {
var sm = document.createElement('script'); sm.type = 'text/javascript'; sm.async = true;
sm.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'cdnmaster.com/sitemaster/collect.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(sm, s);
})();
</script>
<script type='text/javascript'>	
var _fxcmd = _fxcmd || [];	
_fxcmd.sid = '6ca030d463eb8bef91593e197ecdf1cb';	
(function () {	
var _pzfx = document['createElement']('script');	
_pzfx.type = 'text/javascript';	
_pzfx.async = true;
_pzfx.src = '//static.w3t.cn/fx/1/1/fx.js';	
var sc = document.getElementsByTagName('script')[0];	
sc.parentNode.insertBefore(_pzfx, sc);
})();
</script>
</body>
</html>